package as3.component.ui
{
	import flash.display.Bitmap;
	import flash.display.BitmapData;
	import flash.display.DisplayObject;
	import flash.display.Sprite;

	public class DragBitmap extends Sprite
	{
		public function DragBitmap()
		{
			alpha = 0.7;
			this.mouseChildren = false;
			this.mouseEnabled = false;
		}
		
		public function drawBitmap(target:DisplayObject):void
		{
			if (!target) return;
			var bitmap:Bitmap = new Bitmap();
			bitmap.bitmapData = new BitmapData(target.width, target.height, true, 0x00000000);
			bitmap.bitmapData.draw(target);
			this.addChild(bitmap);
			target = null;
		}
		
	}
}